Skip to content

feat: add reference causal-LM execution and parity checks - #34

Open
soomro-abd wants to merge 1 commit into
feat/finance-benchmark-evaluationfrom
feat/reference-causal-lm
Open

soomro-abd wants to merge 1 commit into
feat/finance-benchmark-evaluationfrom
feat/reference-causal-lm

Conversation

@soomro-abd

Copy link
Copy Markdown
Collaborator

Causal-LM tasks previously required Flower, so FLTest could not compare their orchestration against its reference backend. This adds sequential reference execution for Finance, Stack Overflow and Medical, and requires matching training evidence before declaring cross-framework parity.

Depends on #33. The base is feat/finance-benchmark-evaluation so this PR contains the reference backend and parity checks. Merge the stack in dependency order and retarget after the parent lands.

Changes

  • Run LoRA and full-model LM training in a local PyTorch loop without Flower/Ray execution machinery. Preserve client sampling, hook lifecycles, schedules, micro-batching, round-zero/per-round evaluation and final checkpoints.
  • Aggregate both backends' LM responses in client-ID order, independent of RPC completion order, and record an initialization fingerprint.
  • Group comparisons by LM training, tokenizer, precision, resource and evaluation settings; exclude checkpoint destinations. Count Flower aliases as one backend.
  • Require matching data provenance, parameter manifests, initialization, selected clients, successful record IDs, weights and applicable poisoning/user/schedule evidence. Compare the requested finite metric at every round and in the final summary; fail on missing evidence.
  • Add three GPU parity configurations, real tiny-model CPU integration tests, adversarial evidence tests and documentation.

Validation

  • Full Linux/Python 3.11 suite at this commit: 325 passed, 1 optional NVFlare test skipped; strict MkDocs build passed.
  • CPU comparisons exercise real Flower client/strategy boundaries, reversed response arrival order, LoRA/full-model checkpoint weights, poisoning, membership probes, clipping, noise, secure aggregation and MPC.
  • Six two-round GPU runs (reference and Flower for each application) passed with SmolLM2-135M. Every-round checked metrics and prediction details matched exactly; checkpoint tensors also matched exactly: 120 Finance adapter tensors, 272 Stack Overflow full-model tensors and 120 Medical adapter tensors. Each Flower run used both Quadro RTX 6000 nodes.
  • Source checksums matched on both nodes, git diff --check passed, Ray was stopped and both GPUs returned to idle.

The backends share data, local-training, evaluation and aggregation helpers. This comparison tests orchestration/transport agreement rather than independently verifying those shared algorithms. Small exact matches do not establish general GPU determinism or full benchmark quality.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant